﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="list_major_subject.aspx.cs" Inherits="list_major_subject" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxtoolkit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title>List major subject</title>
   <link rel="stylesheet" href="styles/jquery.autocomplete.css" type="text/css" />
   <link href="styles/style.css" rel="stylesheet" type="text/css" />         
   <link type="text/css" href="css/smoothness/jquery-ui-1.8.11.custom.css" rel="stylesheet" /> 
   <script src="js/jquery-1.5.min.js" type="text/javascript"></script>
   <script src="js/jquery-ui-1.8.9.custom.min.js" type="text/javascript"></script>    
</head>
<body>
       <form id="form1" runat="server">

    <div class="wrapper">
         <div id="header">
		<h1 class="logo">
        <a href="index.aspx">
        	<img src="images/logo.png" width="280" height="46" border="0" /></a>
        
        </h1>
         <div class="login_zone" >
                Username:<asp:Literal ID="lUsername" Text="" runat="server" />
                <br />
                 <asp:LinkButton ID="lnkLogout" runat="server" Text="Logout" 
                    onclick="lnkLogout_Click" /> | <a href="login/change_pass.aspx">Change password</a>
        </div>
        </div>
     <div class="clear"></div>
        <div id="nav">
         <div style="margin-bottom:20px;width:280px;float:left;">
              <ul class="breadcrumb">
            <li>
                <a href="index.aspx" title="Home">
             
                        <img src="images/home.png" width="24" height="23" border="0" align="left" style="margin-top:2px;" class="home" />
          
                </a>
              
            </li>
            <li>
            <a href="index.aspx"   title="homepage">
                Homepage
                </a>
            </li>
            <li>
                
                    List major subjects
                
           </li>
      
     </ul>
     </div>
        </div>
    
    <div class="main_content2">
       <div style="margin-top:-8px;">
             <img src="images/list_major_subject.png" width="900" height="77" />
           </div>
           <br /><br />
         <table width="100%">
            <tr>        
                <td align="right">City:</td>        
                <td align="left" >
                      <asp:DropDownList ID="cbCity" runat="server" AutoPostBack="True" 
                          onselectedindexchanged="cbCity_SelectedIndexChanged">
                      </asp:DropDownList>
                </td>
            </tr>
    
        <tr>
        
            <td align="right">School:</td>        
            <td align="left" >               
            
                  <asp:DropDownList ID="cbSchool" runat="server" AutoPostBack="True" 
                      onselectedindexchanged="cbSchool_SelectedIndexChanged">
                  </asp:DropDownList>
            </td>
        </tr>
    
        <tr>        
            <td align="right">Major subject:<td align="left">
                
            
                  <asp:TextBox ID="txtDisciplines" runat="server" CssClass="box2" Width="404px" 
                      Height="20px"></asp:TextBox>
                  <asp:Button ID="btnAdd" runat="server" Text="Add" class="button white" 
                  onclick="btnAdd_Click" />
              
                  <asp:Button ID="btnCancel" runat="server" Text="Cancel" 
                    class="button white" onclick="btnCancel_Click" />
              
               <ajaxtoolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
                  </ajaxtoolkit:ToolkitScriptManager>
                                
              </td>
        </tr>
    
        <tr>
        
            <td align="left" colspan="2">                
                <asp:GridView ID="gdDisciplines" runat="server" AllowPaging="True" AutoGenerateColumns="False"                                      
                   CssClass="border_grid" HorizontalAlign="Center" Width="80%" onrowediting="gdDisciplines_RowEditing" 
                   DataKeyNames="id" onpageindexchanging="gdDisciplines_PageIndexChanging" 
                    onrowcommand="gdDisciplines_RowCommand" 
                    onrowdatabound="gdDisciplines_RowDataBound" onrowdeleting="gdDisciplines_RowDeleting"
                    >
                   <PagerStyle CssClass="grid_footer_pager" />
                   <Columns>
           
                       <asp:TemplateField HeaderText="No">
                           <HeaderStyle CssClass="header_grid" />
                           <ItemTemplate>
                                   <%#Container.DataItemIndex + 1%>
                           </ItemTemplate> 
                       </asp:TemplateField>
   
                       
                       <asp:TemplateField HeaderText="Majorid">
                        <ItemTemplate>
                            <%#Eval("id") %>
                        </ItemTemplate>
                           <HeaderStyle CssClass="header_grid" />
                       </asp:TemplateField>
                       
                       
                       <asp:TemplateField HeaderText="City">
                           <HeaderStyle CssClass="header_grid" />
                            <ItemTemplate>
                            <%#Eval("city_id") %>
                        </ItemTemplate>
                       </asp:TemplateField>
                       
                       
                       <asp:TemplateField HeaderText="SchoolID">
                           <HeaderStyle CssClass="header_grid" />
                            <ItemTemplate>
                             <%#Eval("school_id")%>
                          </ItemTemplate>
                           <ItemStyle HorizontalAlign="Center" />
                       </asp:TemplateField>
                       
                       
                       <asp:TemplateField HeaderText="School name">
                           <HeaderStyle CssClass="header_grid" />
                           <ItemTemplate>
                            <%#Eval("schoolname") %>
                        </ItemTemplate>
                       </asp:TemplateField>
                          
                       <asp:TemplateField HeaderText="major subject">
                           <HeaderStyle CssClass="header_grid" />
                              <ItemTemplate>
                             <%#Eval("majorsubject_name")%>
                          </ItemTemplate>
                           
                       </asp:TemplateField>
                          
                       
                       <asp:TemplateField HeaderText="Action">
                           <HeaderStyle CssClass="header_grid" />
                          
                           
                           <ItemTemplate>
                              <asp:LinkButton ID="btnEditSchool" runat="server" Text="Edit" CommandName="Edit" OnClick="MajorSubject_Click" />
                                <asp:LinkButton ID="lnkButtonDelete" CommandArgument='<%#Eval("id")%>' CommandName="Delete" runat="server">
                                Delete
                                </asp:LinkButton>
                          </ItemTemplate>
                           <ItemStyle HorizontalAlign="Center" />
                       </asp:TemplateField>
                          
                       
                   </Columns>
                   <FooterStyle HorizontalAlign="Right" BackColor="DarkGray" BorderColor="DarkGray" 
                        BorderStyle="Solid" BorderWidth="1px" />
                
                   <PagerStyle HorizontalAlign="Center" VerticalAlign="Middle" />
               </asp:GridView>
            </td>
        </tr>    
    </table>
    
        <asp:Panel ID="panelEdit" runat="server">    
         <br />
            <table style="width: 500px; background-color: #ffffdd;filter: alpha(opacity=0.9);opacity: 0.9;" >
            <tr>
                <td align="right">
                
                    City:</td>
            
                <td align="left">
                    <asp:DropDownList ID="cbCity2" runat="server">
                    </asp:DropDownList>
                </td>
            
            </tr>
             <tr>
                 <td align="right">
                     School name:</td>
                 <td align="left">
                     <asp:DropDownList ID="cbSchool2" runat="server">
                     </asp:DropDownList>
                 </td>
             </tr>
            <tr>
                <td align="right">
                
                    Major subject:</td>
                <td align="left">
                    <asp:TextBox ID="txtMajorSubject" runat="server" CssClass="box2" Width="370px" 
                        Height="26px"></asp:TextBox>
                </td>
            </tr>
             <tr>
                 <td>
                     &nbsp;</td>
                 <td  align="left">
                     <asp:Button ID="btnSave" runat="server" Text="Save" CssClass="button white" 
                         onclick="btnSave_Click" />
                     &nbsp;
                     <asp:Button ID="btnCancelEdit" runat="server" Text="Cancel" CssClass="button white" OnClientClick="return hidePopup();"/>
                 </td>
             </tr>
         </table>
        </asp:Panel>
         <asp:LinkButton ID="lnkFake" runat="server"></asp:LinkButton>
        <ajaxtoolkit:modalpopupextender ID="popupEdit" runat="server"
                     PopupControlID="panelEdit" TargetControlID="lnkFake" />
         <uc:OkMessageBox ID="omb" runat="server" />
    
     </div>
     
</div>     
     </form>
</body>
</html>
